<%@ Control Language="VB" AutoEventWireup="false" codefile="News.ascx.vb" Inherits="NewsControl" %>


<asp:SqlDataSource id="SqlDataSource1" Runat="server"
    ProviderName="<%$ ConnectionStrings:WroxUnited.ProviderName %>"
    ConnectionString="<%$ ConnectionStrings:WroxUnited %>">
  <SelectParameters>
    <asp:Parameter DefaultValue="5" Name="Show" Type="int32" />
  </SelectParameters>
</asp:SqlDataSource>

<asp:Repeater ID="Repeater1" Runat="server" DataSourceID="SqlDataSource1"
    OnItemDataBound="NewsItem_DataBound">
    <ItemTemplate>
        <div class="newsItem">
            <span class="newsDate"><%#Eval("DateToShow", "{0:dd MMM yyyy}")%></span>
            <span class="newsTitle"><%#Eval("Title")%></span>
        </div>
        <span class="newsContent">
            <asp:Image style="float:right" ID="NewsImage" Runat="server"
                ImageUrl='<%# Eval("PictureURL", "~/NewsImages/{0}") %>' />
            <%#Eval("Description") %>
        </span>
    </ItemTemplate>
</asp:Repeater>
